package com.dyh.pojo;

import java.util.Date;


public class Blog {

    private int id;

    /*
    * 文章标题
    * */
    private String title;

    /*
    * 编写文章的用户, 和用户表连接起来, 用户创建了哪些文章拿他去查
    * */
    private int authorId;

    /*
    * 文章分类
    * */
    private int categoryId;

    /*
    * 文章内容
    * */
    private String content;

    /*
    * 创建时间
    * */
    private Date createTime;

    /*
    * 修改时间
    * */
    private Date updateTime;

    /*
    * 点赞
    * */
    private int like;

    public Blog(int id, String title, int authorId, int categoryId, String content, Date createTime, Date updateTime, int like) {
        this.id = id;
        this.title = title;
        this.authorId = authorId;
        this.categoryId = categoryId;
        this.content = content;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.like = like;
    }

    public Blog() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getAuthorId() {
        return authorId;
    }

    public void setAuthorId(int authorId) {
        this.authorId = authorId;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public int getLike() {
        return like;
    }

    public void setLike(int like) {
        this.like = like;
    }

    @Override
    public String toString() {
        return "Blog{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", authorId=" + authorId +
                ", categoryId=" + categoryId +
                ", content='" + content + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", like=" + like +
                '}';
    }
}
